<template>
  <div>
    <el-table :data="records" style="width: 100%">
      <el-table-column type="index" label="序号" width="50" />
      <el-table-column prop="typeName" :formatter="formatter" label="项目变更类型" />
      <el-table-column prop="beforeContent" label="变更前" />
      <el-table-column prop="afterContentName" label="变更后" />
      <el-table-column prop="description" label="申请变更描述" />
    </el-table>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { useStore } from 'vuex'


export default defineComponent({
  setup() {
    const store = useStore()

    let records = store.state.projectCenter.form.changeProjectsList.filter(item=>{
      return item.status == 2
    })
    const formatter = (row) => {
      if(row.type==1){
        return '负责人变更'
      }else if(row.type==2){
        return '项目内容变更'
      }else{
        return '承接单位变更'
      }
    }
    return {
      store,
      records,
      formatter
    }
  },
})
</script>

<style scoped>
.utils {
  margin: 10px 20px;
}
.demo-form-inline .el-form-item {
  width: 45%;
}
:deep(.el-dialog__body) {
  display: block;
  padding: 10px 20px;
}
</style>
